Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix affected target computation breaking CI workflows when no targets are affected #2696

Merged
merged 11 commits into from
Feb 13, 2021

Conversation

BenHenning
Copy link
Member

See #2691 (comment) & https://github.com/oppia/oppia-android/actions/runs/560112155 for context. It seems when there are no affected targets an empty line will be printed which breaks something between the jobs. I think this will fix it.

Conveniently, this PR should trigger the "no affected targets" workflow & can self-verify itself.

@BenHenning
Copy link
Member Author

(Note that this is effectively in 'draft' mode but can't actually be marked as draft since we need to run CI for investigation here).

@BenHenning BenHenning changed the title Fix affected target computation breaking CI workflows when no targets are affected Fix affected target computation breaking CI workflows when no targets are affected [DO NOT MERGE] Feb 12, 2021
While Bazel can run an empty list of tests, GitHub actions always
expects at least 1 entry for matrix-dependent actions.

This is based on
https://github.community/t/empty-matrix-fails-workflow/128736/2. It's
not yet clear if this will properly allow check_test_results to pass if
the workflow is skipped. That will need to be tested.
@BenHenning
Copy link
Member Author

@BenHenning
Copy link
Member Author

Now that #2710 is merged restarting these workflows to see if I fixed the issue.

…ithub.com:oppia/oppia-android into fix-incorrect-affected-target-handling-when-empty
@BenHenning
Copy link
Member Author

BenHenning commented Feb 13, 2021

Yay, looks like this solution works. However, it does cause the check test results action to fail. :( I was partly expecting that to happen. I guess we need to also need to condition the steps of that task or something. Need to think on it a bit more.

@BenHenning
Copy link
Member Author

Awesome, it's passing now. Reenabling other tests & sending this out for review.

Reenable jobs.
Undo removing the newline since it's not actually needed.
@BenHenning BenHenning requested review from jcqli and removed request for anandwana001 February 13, 2021 03:04
@BenHenning BenHenning assigned jcqli and unassigned BenHenning Feb 13, 2021
@BenHenning BenHenning changed the title Fix affected target computation breaking CI workflows when no targets are affected [DO NOT MERGE] Fix affected target computation breaking CI workflows when no targets are affected Feb 13, 2021
I forgot that we're performing an empty check, so the extra newline does
break it.
@BenHenning BenHenning assigned anandwana001 and unassigned jcqli Feb 13, 2021
@BenHenning BenHenning requested review from anandwana001 and removed request for jcqli February 13, 2021 03:08
@BenHenning BenHenning enabled auto-merge (squash) February 13, 2021 03:08
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @BenHenning

@BenHenning BenHenning merged commit 4f2db2d into develop Feb 13, 2021
@BenHenning BenHenning deleted the fix-incorrect-affected-target-handling-when-empty branch February 13, 2021 03:31
@pankajpoply45 pankajpoply45 mentioned this pull request Mar 23, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants